﻿using System;
class Program
{
    /// <summary>
    /// 汉诺塔问题 本质上是一种递归思想，递归一次减少一个最底层的盘子
    /// </summary>
    static void Main()
    {
        int n = 3; // 盘子的数量
        Hanoi(n, 'A', 'B', 'C');
    }
    static void Hanoi(int n, char source, char auxiliary, char target)
    {
        if (n == 1)
        {
            Console.WriteLine($"Move plate 1 from {source} to {target}");
            return;
        }
        Hanoi(n - 1, source, target, auxiliary);
        Console.WriteLine($"Move plate {n} from {source} to {target}");
        Hanoi(n - 1, auxiliary, source, target);
    }
}